/*
 * @Description: 
 * @Author: 于子续
 * @Date: 2024-09-03 15:54:16
 * @LastEditors: 于子续
 * @LastEditTime: 2024-09-03 15:55:25
 */

package day07;

public class Test04 {
    public static void main(String[] args) {
        int r = setBit(10, 3);
        System.out.println("r:" + r);

    }

    public static int setBit(int v, int n) {
        return ~(~v | (1 << n));
    }
}
